﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="MainExercicio.aspx.cs" Inherits="AcademiaInteligenteWeb.MainExercicio" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>
        Exercicio
    </h1>
    <div id="acoes">
        <ul>
           <li>
                <a href="NewExercicio.aspx">Nova</a>
                <a href="MainTipoExercicio.aspx">Tipo de Exercicio</a>
            </li>
            <%if (grdExercicio.Rows.Count > 0 && grdExercicio.SelectedRow != null)
              {%>
            <li>
                <a href="NewExercicio.aspx?id=<%=grdExercicio.SelectedValue %>">Alterar</a>
            </li>
            <li>
                <asp:LinkButton Text="Excluir" Id="lnkExcluir" runat="server" OnClick="lnkExcluir_Click" />
            </li>
            <%} %>
       </ul>
    </div>
     <div id="dados">
        <asp:GridView ID="grdExercicio" runat="server" AllowPaging="true" AutoGenerateSelectButton="true">
            <AlternatingRowStyle CssClass="alterningRow" />
            <SelectedRowStyle CssClass="selectedRow" />
            <Columns>

                 <asp:TemplateField HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"  HeaderStyle-Width="30px">
                    <ItemTemplate>
                        <input type="checkbox" name="chkSelect" class="checkboxGrid" value='<%#Eval("id")%>' />
                    </ItemTemplate>
                </asp:TemplateField> 
                
                <asp:BoundField DataField="idAcademia" HeaderText="Cód. Academia"/>
                <asp:BoundField DataField="Descricao" HeaderText="Descrição" />
                <asp:BoundField DataField="idTipoModalidade" HeaderText="Cód. tipo de modalidade"/>
                
                <asp:TemplateField HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"  HeaderStyle-Width="30px" HeaderText="Ativo">
                    <ItemTemplate>
                        <input type="checkbox" name="chkAtivo" class="checkboxGrid" value='<%#Eval("Ativo")%>' />
                    </ItemTemplate>
                </asp:TemplateField> 

                <asp:BoundField DataField="DataInclusao" HeaderText="Data da inclusão" DataFormatString="{0:dd/MM/yyyy}" />
                
                
            </Columns>
        </asp:GridView>
    </div>

</asp:Content>
